Skip to content

Change get_int_value() to a function in mathics.core.atoms.numerics. Remove it as an method of Element - #1934

Merged
mmatera merged 7 commits into
masterfrom
isolate-to-numerics-get_int_value
Sep 5, 2026
Merged

Change get_int_value() to a function in mathics.core.atoms.numerics. Remove it as an method of Element#1934
mmatera merged 7 commits into
masterfrom
isolate-to-numerics-get_int_value

Conversation

@rocky

@rocky rocky commented Sep 3, 2026

Copy link
Copy Markdown
Member

Change get_int_value() to a function in mathics.core.atoms.numerics. Remove it as an method of Element.

get_int_value() is a highly custom kind of function, not a fundamental property of an element.

This is part of a long-desired reorganization of mathics.core to make it comprehensible and logical, and more in line with modern Python conventions.

.int_value is now a property on methods only where it makes sense.

@rocky
rocky force-pushed the isolate-to-numerics-get_int_value branch from f2910b0 to 386125c Compare September 3, 2026 20:38
@rocky

rocky commented Sep 5, 2026

Copy link
Copy Markdown
Member Author

@mmatera: Before we make what will look like massive changes to the code pattern and/or assignment code, I'd like this cleanup to be in place first.

@mmatera

mmatera commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

LGTM. Thanks!

@mmatera
mmatera merged commit ca5b7fa into master Sep 5, 2026
15 checks passed
@mmatera
mmatera deleted the isolate-to-numerics-get_int_value branch September 5, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants